import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import order from "../views/PersonalPage/order.vue"//订单
import course from "../views/PersonalPage/course.vue"//课程
import site from "../views/PersonalPage/site.vue"//地址
import collect from "../views/PersonalPage/collect.vue"//收藏
import vip from "../views/PersonalPage/vip.vue"//会员
import coupon from "../views/PersonalPage/coupon.vue"//优惠券
import information from "../views/PersonalPage/information.vue"//消息
import issue from "../views/PersonalPage/issue.vue"//问题
import set from "../views/PersonalPage/set.vue"//设置
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login.vue'),
    meta: {
      isShow: false
    }
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      isShow: true
    }
  },
  // {
  //   path: '/',
  //   name: 'page',
  //   component: () => import('../views/page.vue')
  // },
  {
    path: '/my',
    name: 'my',
    component: () => import('../views/my.vue'),
    meta: {
      isShow: true
    }
  },
  {
    path: '/MeowHouse',
    name: 'MeowHouse',
    component: () => import('../views/MeowHouse.vue'),
    meta: {
      isShow: true
    }
  },
  {
    path: '/personal',
    name: 'personal',
    component: () => import('../views/personal.vue'),
    meta: {
      isShow: true
    }
  },
  {
    path: '/detail',
    name: 'detail',
    component: () => import('../components/detail/detail.vue'),
    meta: {
      title: "课程详情",
      isShow: false
    }
  },
  {
    path: '/search',
    name: 'search',
    component: () => import('../components/search/index.vue'),
    meta: {
      isShow: false
    }
  },
  {
    path: '/publicity',
    name: 'publicity',
    component: () => import('../components/publicity/publicity.vue'),
    meta: {
      title: "近期公开课",
      isShow: false
    }
  },
  { path: "/order", component: order, meta: { title: "我的订单" } },
  { path: "/course", component: course, meta: { title: "我的学习卡" } },
  { path: "/site", component: site, meta: { title: "地址管理" } },
  { path: "/collect", component: collect, meta: { title: "我的收藏" } },
  { path: "/vip", component: vip, meta: { title: "会员" } },
  { path: "/coupon", component: coupon, meta: { title: "我的优惠券" } },
  { path: "/information", component: information, meta: { title: "消息通知" } },
  { path: "/issue", component: issue, meta: { title: "问题反馈" } },
  { path: "/set", component: set, meta: { title: "设置" } },



]

const router = new VueRouter({
  routes
})

export default router
